package com.lucence.b_thead;

import java.io.IOException;

import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
import org.apache.lucene.store.LockObtainFailedException;
import org.apache.lucene.util.Version;
import org.junit.Test;

import com.lucence.util.Config;
import com.lucence.util.LuceneUtil;

public class TestIndexWriter {
	@Test
	public void testIndexWriter() throws Exception{
//		IndexWriterConfig indexWriterConfig1 = new IndexWriterConfig(Version.LUCENE_36, Config.getAnalyzer());
//		IndexWriter indexWriter1 = new IndexWriter(Config.getDirectory(),indexWriterConfig1);
//		
//		IndexWriterConfig indexWriterConfig2 = new IndexWriterConfig(Version.LUCENE_36, Config.getAnalyzer());
//		IndexWriter indexWriter2 = new IndexWriter(Config.getDirectory(),indexWriterConfig2);
		
		IndexWriter indexWriter1 = LuceneUtil.getIndexWriter();
		
		IndexWriter indexWriter2 = LuceneUtil.getIndexWriter();
		
		
	}
}
